// Start of user code Copyright
/*
 * Copyright (c) 2020 Contributors to the Eclipse Foundation
 *
 * See the NOTICE file(s) distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License 1.0
 * which is available at http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
 */
// End of user code

package org.eclipse.lyo.oslc.domains.qm;

// spotless:off
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.text.SimpleDateFormat;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import java.util.Iterator;

import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue;
import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription;
import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty;
import org.eclipse.lyo.oslc4j.core.annotation.OslcName;
import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace;
import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs;
import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition;
import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType;
import org.eclipse.lyo.oslc4j.core.annotation.OslcRange;
import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly;
import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation;
import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape;
import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle;
import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType;
import org.eclipse.lyo.oslc4j.core.model.AbstractResource;
import org.eclipse.lyo.oslc4j.core.model.Link;
import org.eclipse.lyo.oslc4j.core.model.Occurs;
import org.eclipse.lyo.oslc4j.core.model.OslcConstants;
import org.eclipse.lyo.oslc4j.core.model.Representation;
import org.eclipse.lyo.oslc4j.core.model.ValueType;

import org.eclipse.lyo.oslc.domains.qm.Oslc_qmDomainConstants;
import org.eclipse.lyo.oslc.domains.cm.Oslc_cmDomainConstants;
import org.eclipse.lyo.oslc.domains.DctermsDomainConstants;
import org.eclipse.lyo.oslc.domains.FoafDomainConstants;
import org.eclipse.lyo.oslc4j.core.model.OslcDomainConstants;
import org.eclipse.lyo.oslc.domains.qm.Oslc_qmDomainConstants;
import org.eclipse.lyo.oslc.domains.RdfDomainConstants;
import org.eclipse.lyo.oslc.domains.rm.Oslc_rmDomainConstants;
import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants;
import org.eclipse.lyo.oslc.domains.Oslc_qmVocabularyConstants;
import org.eclipse.lyo.oslc.domains.RdfVocabularyConstants;
import org.eclipse.lyo.oslc.domains.cm.IChangeRequest;
import org.eclipse.lyo.oslc.domains.IPerson;
import org.eclipse.lyo.oslc.domains.rm.IRequirement;
import org.eclipse.lyo.oslc.domains.qm.ITestScript;
// Start of user code imports
import org.eclipse.lyo.oslc.domains.Oslc_qmVocabularyConstants;
// End of user code
// spotless:on

@OslcNamespace(Oslc_qmDomainConstants.TESTCASE_NAMESPACE)
@OslcName(Oslc_qmDomainConstants.TESTCASE_LOCALNAME)
@OslcResourceShape(title = "TestCase Shape", describes = Oslc_qmDomainConstants.TESTCASE_TYPE)
public interface ITestCase {

  public void addContributor(final Link contributor);

  public void addCreator(final Link creator);

  public void addInstanceShape(final Link instanceShape);

  public void addServiceProvider(final Link serviceProvider);

  public void addSubject(final String subject);

  public void addType(final Link type);

  public void addRelatedChangeRequest(final Link relatedChangeRequest);

  public void addTestsChangeRequest(final Link testsChangeRequest);

  public void addUsesTestScript(final Link usesTestScript);

  public void addValidatesRequirement(final Link validatesRequirement);

  @OslcName("contributor")
  @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "contributor")
  @OslcDescription(
      "Contributor or contributors to the resource. It is likely that the target resource will be a"
          + " foaf:Person but that is not necessarily the case.")
  @OslcOccurs(Occurs.ZeroOrMany)
  @OslcValueType(ValueType.Resource)
  @OslcRange({FoafDomainConstants.PERSON_TYPE})
  @OslcReadOnly(false)
  public Set<Link> getContributor();

  @OslcName("created")
  @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "created")
  @OslcDescription("Timestamp of resource creation")
  @OslcOccurs(Occurs.ZeroOrOne)
  @OslcValueType(ValueType.DateTime)
  @OslcReadOnly(false)
  public Date getCreated();

  @OslcName("creator")
  @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "creator")
  @OslcDescription(
      "Creator or creators of the resource. It is likely that the target resource will be a"
          + " foaf:Person but that is not necessarily the case.")
  @OslcOccurs(Occurs.ZeroOrMany)
  @OslcValueType(ValueType.Resource)
  @OslcRange({FoafDomainConstants.PERSON_TYPE})
  @OslcReadOnly(false)
  public Set<Link> getCreator();

  @OslcName("description")
  @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description")
  @OslcDescription(
      "Descriptive text about resource represented as rich text in XHTML content. SHOULD include"
          + " only content that is valid and suitable inside an XHTML <div> element.")
  @OslcOccurs(Occurs.ZeroOrOne)
  @OslcValueType(ValueType.XMLLiteral)
  @OslcReadOnly(false)
  public String getDescription();

  @OslcName("identifier")
  @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier")
  @OslcDescription(
      "A unique identifier for a resource. Typically read-only and assigned by the service provider"
          + " when a resource is created. Not typically intended for end-user display.")
  @OslcOccurs(Occurs.ExactlyOne)
  @OslcValueType(ValueType.String)
  @OslcReadOnly(false)
  public String getIdentifier();

  @OslcName("modified")
  @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "modified")
  @OslcDescription("Timestamp of latest resource modification")
  @OslcOccurs(Occurs.ZeroOrOne)
  @OslcValueType(ValueType.DateTime)
  @OslcReadOnly(false)
  public Date getModified();

  @OslcName("instanceShape")
  @OslcPropertyDefinition(OslcDomainConstants.OSLC_NAMSPACE + "instanceShape")
  @OslcDescription(
      "The URI of a Resource Shape that describes the possible properties, occurrence, value types,"
          + " allowed values and labels. This shape information is useful in displaying the subject"
          + " resource as well as guiding clients in performing modifications. Instance shapes may"
          + " be specific to the authenticated user associated with the request that retrieved the"
          + " resource, the current state of the resource and other factors and thus should not be"
          + " cached.")
  @OslcOccurs(Occurs.ZeroOrMany)
  @OslcValueType(ValueType.Resource)
  @OslcRepresentation(Representation.Reference)
  @OslcReadOnly(false)
  public Set<Link> getInstanceShape();

  @OslcName("serviceProvider")
  @OslcPropertyDefinition(OslcDomainConstants.OSLC_NAMSPACE + "serviceProvider")
  @OslcDescription(
      "A link to the resource's OSLC Service Provider. There may be cases when the subject resource"
          + " is available from a service provider that implements multiple domain specifications,"
          + " which could result in multiple values for this property.")
  @OslcOccurs(Occurs.ZeroOrMany)
  @OslcValueType(ValueType.Resource)
  @OslcRepresentation(Representation.Reference)
  @OslcReadOnly(false)
  public Set<Link> getServiceProvider();

  @OslcName("subject")
  @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "subject")
  @OslcDescription(
      "Tag or keyword for a resource. Each occurrence of a dcterms:subject property denotes an"
          + " additional tag for the resource.")
  @OslcOccurs(Occurs.ZeroOrMany)
  @OslcValueType(ValueType.String)
  @OslcReadOnly(false)
  @OslcTitle("")
  public Set<String> getSubject();

  @OslcName("title")
  @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "title")
  @OslcDescription(
      "Title of the resource represented as rich text in XHTML content. SHOULD include only content"
          + " that is valid inside an XHTML <span> element.")
  @OslcOccurs(Occurs.ExactlyOne)
  @OslcValueType(ValueType.XMLLiteral)
  @OslcReadOnly(false)
  public String getTitle();

  @OslcName("type")
  @OslcPropertyDefinition(RdfVocabularyConstants.RDF_NAMSPACE + "type")
  @OslcDescription("The resource type URIs")
  @OslcOccurs(Occurs.ZeroOrMany)
  @OslcValueType(ValueType.Resource)
  @OslcReadOnly(false)
  public Set<Link> getType();

  @OslcName("relatedChangeRequest")
  @OslcPropertyDefinition(
      Oslc_qmVocabularyConstants.QUALITY_MANAGEMENT_NAMSPACE + "relatedChangeRequest")
  @OslcDescription(
      "A related change request. It is likely that the target resource will be an"
          + " oslc_cm:ChangeRequest but that is not necessarily the case.")
  @OslcOccurs(Occurs.ZeroOrMany)
  @OslcValueType(ValueType.Resource)
  @OslcRepresentation(Representation.Reference)
  @OslcRange({Oslc_cmDomainConstants.CHANGEREQUEST_TYPE})
  @OslcReadOnly(false)
  public Set<Link> getRelatedChangeRequest();

  @OslcName("testsChangeRequest")
  @OslcPropertyDefinition(
      Oslc_qmVocabularyConstants.QUALITY_MANAGEMENT_NAMSPACE + "testsChangeRequest")
  @OslcDescription(
      "Change Request tested by the Test Case. It is likely that the target resource will be an"
          + " oslc_cm:ChangeRequest but that is not necessarily the case.")
  @OslcOccurs(Occurs.ZeroOrMany)
  @OslcValueType(ValueType.Resource)
  @OslcRepresentation(Representation.Reference)
  @OslcRange({Oslc_cmDomainConstants.CHANGEREQUEST_TYPE})
  @OslcReadOnly(false)
  public Set<Link> getTestsChangeRequest();

  @OslcName("usesTestScript")
  @OslcPropertyDefinition(Oslc_qmVocabularyConstants.QUALITY_MANAGEMENT_NAMSPACE + "usesTestScript")
  @OslcDescription(
      "Test Script used by the Test Case. It is likely that the target resource will be an"
          + " oslc_qm:TestScript but that is not necessarily the case.")
  @OslcOccurs(Occurs.OneOrMany)
  @OslcValueType(ValueType.Resource)
  @OslcRange({Oslc_qmDomainConstants.TESTSCRIPT_TYPE})
  @OslcReadOnly(false)
  public Set<Link> getUsesTestScript();

  @OslcName("validatesRequirement")
  @OslcPropertyDefinition(
      Oslc_qmVocabularyConstants.QUALITY_MANAGEMENT_NAMSPACE + "validatesRequirement")
  @OslcDescription(
      "Requirement that is validated by the Test Case. It is likely that the target resource will"
          + " be an oslc_rm:Requirement but that is not necessarily the case.")
  @OslcOccurs(Occurs.ZeroOrMany)
  @OslcValueType(ValueType.Resource)
  @OslcRepresentation(Representation.Reference)
  @OslcRange({Oslc_rmDomainConstants.REQUIREMENT_TYPE})
  @OslcReadOnly(false)
  public Set<Link> getValidatesRequirement();

  public void setContributor(final Set<Link> contributor);

  public void setCreated(final Date created);

  public void setCreator(final Set<Link> creator);

  public void setDescription(final String description);

  public void setIdentifier(final String identifier);

  public void setModified(final Date modified);

  public void setInstanceShape(final Set<Link> instanceShape);

  public void setServiceProvider(final Set<Link> serviceProvider);

  public void setSubject(final Set<String> subject);

  public void setTitle(final String title);

  public void setType(final Set<Link> type);

  public void setRelatedChangeRequest(final Set<Link> relatedChangeRequest);

  public void setTestsChangeRequest(final Set<Link> testsChangeRequest);

  public void setUsesTestScript(final Set<Link> usesTestScript);

  public void setValidatesRequirement(final Set<Link> validatesRequirement);
}
